package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterCashWithdrawalDao;
import com.vf.admin.miaodong.entity.AppCashWithdrawal;
import com.vf.admin.miaodong.service.AfterCashWithdrawalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 提现
 */
@Service
public class AfterCashWithdrawalServiceImpl implements AfterCashWithdrawalService {

    @Autowired
    AfterCashWithdrawalDao afterCashWithdrawalDao;

    /**
     * 查询列表
     */
    @Override
    public List<AppCashWithdrawal> findList(Map<String, Object> paraMap, SplitPageBean splitPage) {
        return afterCashWithdrawalDao.findList(paraMap,splitPage);
    }

    /**
     * 详情
     */
    @Override
    public AppCashWithdrawal get(Integer id) {
        return afterCashWithdrawalDao.get(id);
    }

    /**
     * 添加/修改
     */
    @Override
    public void save(AppCashWithdrawal appCashWithdrawal) {
        afterCashWithdrawalDao.save(appCashWithdrawal);
    }

    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
        afterCashWithdrawalDao.del(id);
    }

    /**
     * 根据用户id和提现状态获取提现记录
     */
    @Override
    public AppCashWithdrawal getOneByStatus(Integer userid) {
        return afterCashWithdrawalDao.getOneByStatus(userid);
    }
}
